import 'package:hotpot/generated/json/base/json_field.dart';
import 'package:hotpot/generated/json/self_ordering_data.g.dart';
import 'dart:convert';

@JsonSerializable()
class SelfOrderingData {

	String? jsonrpc;
	int? id;
	SelfOrderingDataResult? result;
  
  SelfOrderingData();

  factory SelfOrderingData.fromJson(Map<String, dynamic> json) => $SelfOrderingDataFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResult {

	@JSONField(name: "pos_session")
	SelfOrderingDataResultPosSession? posSession;
	Map<String, dynamic>? attributes;
	@JSONField(name: "pos_categorys")
	List<SelfOrderingDataResultPosCategorys>? posCategorys;
	@JSONField(name: "product_products")
	List<SelfOrderingDataResultProductProducts>? productProducts;
	@JSONField(name: "pos_combo")
	List<SelfOrderingDataResultPosCombo>? posCombo;
	@JSONField(name: "pos_combo_line")
	List<SelfOrderingDataResultPosComboLine>? posComboLine;
	@JSONField(name: "current_language")
	SelfOrderingDataResultCurrentLanguage? currentLanguage;
	@JSONField(name: "available_language")
	List<SelfOrderingDataResultAvailableLanguage>? availableLanguage;
	@JSONField(name: "home_images")
	List<SelfOrderingDataResultHomeImages>? homeImages;
	@JSONField(name: "brand_image")
	String? brandImage;
  
  SelfOrderingDataResult();

  factory SelfOrderingDataResult.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultPosSession {

	int? id;
	String? name;
	@JSONField(name: "user_id")
	List<int>? userId;
	@JSONField(name: "config_id")
	List<int>? configId;
	@JSONField(name: "start_at")
	String? startAt;
	@JSONField(name: "stop_at")
	dynamic stopAt;
	@JSONField(name: "login_number")
	int? loginNumber;
	@JSONField(name: "payment_method_ids")
	List<int>? paymentMethodIds;
	String? state;
	@JSONField(name: "update_stock_at_closing")
	bool? updateStockAtClosing;
	@JSONField(name: "cash_register_balance_start")
	double? cashRegisterBalanceStart;
	@JSONField(name: "access_token")
	dynamic accessToken;
  
  SelfOrderingDataResultPosSession();

  factory SelfOrderingDataResultPosSession.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultPosSessionFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultPosSessionToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAttributes {

	@JSONField(name: "1")
	SelfOrderingDataResultAttributes1? x1;
	@JSONField(name: "2")
	SelfOrderingDataResultAttributes2? x2;
	@JSONField(name: "6")
	SelfOrderingDataResultAttributes6? x6;
  
  SelfOrderingDataResultAttributes();

  factory SelfOrderingDataResultAttributes.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAttributesFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAttributesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAttributes1 {

	int? id;
	String? name;
	@JSONField(name: "display_type")
	String? displayType;
	List<SelfOrderingDataResultAttributes1Values>? values;
	int? sequence;
	@JSONField(name: "can_be_set_qty")
	dynamic canBeSetQty;
	@JSONField(name: "max_qty")
	int? maxQty;
  
  SelfOrderingDataResultAttributes1();

  factory SelfOrderingDataResultAttributes1.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAttributes1FromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAttributes1ToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAttributes1Values {

	int? id;
	String? name;
	@JSONField(name: "is_custom")
	dynamic isCustom;
	@JSONField(name: "html_color")
	dynamic htmlColor;
	dynamic image;
	@JSONField(name: "max_qty")
	int? maxQty;
	@JSONField(name: "price_extra")
	double? priceExtra;
  
  SelfOrderingDataResultAttributes1Values();

  factory SelfOrderingDataResultAttributes1Values.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAttributes1ValuesFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAttributes1ValuesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAttributes2 {

	int? id;
	String? name;
	@JSONField(name: "display_type")
	String? displayType;
	List<SelfOrderingDataResultAttributes2Values>? values;
	int? sequence;
	@JSONField(name: "can_be_set_qty")
	dynamic canBeSetQty;
	@JSONField(name: "max_qty")
	int? maxQty;
  
  SelfOrderingDataResultAttributes2();

  factory SelfOrderingDataResultAttributes2.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAttributes2FromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAttributes2ToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAttributes2Values {

	int? id;
	String? name;
	@JSONField(name: "is_custom")
	bool? isCustom;
	@JSONField(name: "html_color")
	dynamic htmlColor;
	dynamic image;
	@JSONField(name: "max_qty")
	int? maxQty;
	@JSONField(name: "price_extra")
	double? priceExtra;
  
  SelfOrderingDataResultAttributes2Values();

  factory SelfOrderingDataResultAttributes2Values.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAttributes2ValuesFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAttributes2ValuesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAttributes6 {

	int? id;
	String? name;
	@JSONField(name: "display_type")
	String? displayType;
	List<SelfOrderingDataResultAttributes6Values>? values;
	int? sequence;
	@JSONField(name: "can_be_set_qty")
	bool? canBeSetQty;
	@JSONField(name: "max_qty")
	int? maxQty;
  
  SelfOrderingDataResultAttributes6();

  factory SelfOrderingDataResultAttributes6.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAttributes6FromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAttributes6ToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAttributes6Values {

	int? id;
	String? name;
	@JSONField(name: "is_custom")
	dynamic isCustom;
	@JSONField(name: "html_color")
	dynamic htmlColor;
	dynamic image;
	@JSONField(name: "max_qty")
	int? maxQty;
	@JSONField(name: "price_extra")
	double? priceExtra;
  
  SelfOrderingDataResultAttributes6Values();

  factory SelfOrderingDataResultAttributes6Values.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAttributes6ValuesFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAttributes6ValuesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultPosCategorys {

	int? id;
	String? name;
	@JSONField(name: "parent_id")
	List<String>? parentId;
	@JSONField(name: "child_id")
	List<int>? childId;
	@JSONField(name: "write_date")
	String? writeDate;
	@JSONField(name: "has_image")
	bool? hasImage;
	int? color;
  
  SelfOrderingDataResultPosCategorys();

  factory SelfOrderingDataResultPosCategorys.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultPosCategorysFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultPosCategorysToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultProductProducts {

	int? id;
	String? name;
	dynamic barcode;
	@JSONField(name: "default_code")
	String? defaultCode;
	@JSONField(name: "lst_price")
	double? lstPrice;
	@JSONField(name: "need_vegetable_sequence")
	bool? needVegetableSequence;
	@JSONField(name: "can_set_attributes_qty")
	bool? canSetAttributesQty;
	@JSONField(name: "attribute_line_ids")
	List<int>? attributeLineIds;
	@JSONField(name: "pos_categ_ids")
	List<int>? posCategIds;
	@JSONField(name: "combo_ids")
	List<String>? comboIds;
	@JSONField(name: "image_128")
	String? image128;
	List<String>? notes;
  
  SelfOrderingDataResultProductProducts();

  factory SelfOrderingDataResultProductProducts.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultProductProductsFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultProductProductsToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultPosCombo {

	int? id;
	String? name;
	@JSONField(name: "combo_line_ids")
	List<int>? comboLineIds;
	@JSONField(name: "base_price")
	double? basePrice;
  
  SelfOrderingDataResultPosCombo();

  factory SelfOrderingDataResultPosCombo.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultPosComboFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultPosComboToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultPosComboLine {

	int? id;
	@JSONField(name: "product_id")
	List<String>? productId;
	@JSONField(name: "combo_price")
	double? comboPrice;
	@JSONField(name: "combo_id")
	List<String>? comboId;
  
  SelfOrderingDataResultPosComboLine();

  factory SelfOrderingDataResultPosComboLine.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultPosComboLineFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultPosComboLineToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultCurrentLanguage {

	int? id;
	String? code;
	@JSONField(name: "display_name")
	String? displayName;
	@JSONField(name: "flag_image_url")
	String? flagImageUrl;
	String? image;
  
  SelfOrderingDataResultCurrentLanguage();

  factory SelfOrderingDataResultCurrentLanguage.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultCurrentLanguageFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultCurrentLanguageToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultAvailableLanguage {

	int? id;
	String? code;
	@JSONField(name: "display_name")
	String? displayName;
	@JSONField(name: "flag_image_url")
	String? flagImageUrl;
	String? image;
  
  SelfOrderingDataResultAvailableLanguage();

  factory SelfOrderingDataResultAvailableLanguage.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultAvailableLanguageFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultAvailableLanguageToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SelfOrderingDataResultHomeImages {

	int? id;
	String? data;
  
  SelfOrderingDataResultHomeImages();

  factory SelfOrderingDataResultHomeImages.fromJson(Map<String, dynamic> json) => $SelfOrderingDataResultHomeImagesFromJson(json);

  Map<String, dynamic> toJson() => $SelfOrderingDataResultHomeImagesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}